import time

from ctypes import *

mylib = CDLL("./mylib.so")

mylib.sum.restype = c_uint64

mylib.sum.argtypes = [c_uint64]

# def sum(n:int) -> int:
# total=0
# for i in range(n):
# total+=(i+1)
# return total

if __name__ == "__main__":
    start = time.time()
    result = mylib.sum(1456789)
    end = time.time()
    print(f"c({result}):{end - start}")
